/*
Not yet supported in code generation: test
$TSi6967 =& $s[];

<MIR:Assign_var>
	<attrs />
	<MIR:VARIABLE_NAME>
		<attrs>
			<attr key="phc.codegen.compiler_generated"><bool>true</bool></attr>
			<attr key="phc.codegen.st_entry_not_required"><bool>true</bool></attr>
		</attrs>
		<value>TSi6967</value>
	</MIR:VARIABLE_NAME>
	<bool><!-- is_ref -->true</bool>
	<MIR:Array_next>
		<attrs />
		<MIR:VARIABLE_NAME>
			<attrs>
				<attr key="phc.codegen.st_entry_not_required"><bool>true</bool></attr>
			</attrs>
			<value>s</value>
		</MIR:VARIABLE_NAME>
	</MIR:Array_next>
</MIR:Assign_var>


Not yet supported in code generation: unknown construct
$TSi6967 =& $s[];
*/

#include "Generate_C_std.h"
#include "Pattern_assign_var.h"

class Pattern_assign_var_next : public Pattern_assign_var
{
public:
  Expr* rhs_pattern()
  {
    rhs = new Wildcard<Array_next>;
    return rhs;
  }

  void Print(ostream & os,String* r)
  {
    if (r) 
      {
	os << *r;
      }
  }

  void Print(ostream & os,VARIABLE_NAME* r)
  {
    os << "MyVariable(";
    Print(os,r->value);
    os << ")";
  }

  void Print(ostream & os,Array_next* r)
  {
    os << "MyArray_next(";
    Print(os,r->variable_name);
    os << ")";
  }
  void Print(ostream & os,Wildcard<Array_next>* r)
  {
    Print(os,r->value);
  }

  void generate_code(Generate_C* gen)
  {

    //    string var_name = *dyc<VARIABLE_NAME> (rhs->value)->value;
    Print(buf,rhs);
    //    GetString();
    //    buf << var_name;
    
  }
  

  Wildcard<Array_next>* rhs;
  //  Wildcard<VARIABLE_NAME>* index;

};

CREATE(Pattern_assign_var_next);
